import request from '@/utils/request'


export default {
  //医院列表
  getHospitalList(pageNum, pageSize, searchObj) {
    return request({
      url: `/admin/hosp/hospital/list/${pageNum}/${pageSize}`,
      method: 'get',
      params: searchObj
    })
  },
  //省份列表
  getProvinceByDictCode(dictCode) {
    return request({
      url: `/admin/cmn/dict/findByDictCode/${dictCode}`,
      method: 'get',

    })
  },
  //根据省份id获取市列表
  getCityByProvinceId(id) {
    return request({
      url: `/admin/cmn/dict/findChildData/${id}`,
      method: 'get',
    })
  },
  //修改医院状态
  updateStatusById(id, status) {
    return request({
      url: `/admin/hosp/hospital/updateStatus/${id}/${status}`,
      method: 'post'
    })
  },
  //显示医院详情
  showHospital(id) {
    return request({
      url: `/admin/hosp/hospital/showHospital/${id}`,
      method: 'get',
    })
  },
  //获取科室列表
  getDeptByHoscode(hoscode) {
    return request({
      url: `/admin/hosp/department/departmentList/${hoscode}`,
      method: 'get',
    })
  },
  //获取排班规则
  getScheduleRule(pageNum, pageSize, hoscode, depcode) {
    return request({
      url: `/admin/hosp/Schedule/getRuleSchedule/${pageNum}/${pageSize}/${hoscode}/${depcode}`,
      method: 'get'
    })
  },
  //获取排班详细信息
  getDetailSchedule(hoscode, depcode, workDate) {
    return request({
      url: `/admin/hosp/Schedule/getDetailSchedule/${hoscode}/${depcode}/${workDate}`,
      method:'get'
    })
  }

}